package com.example.crud.controller;

import com.example.crud.mapper.ClazzMapper;
import com.example.crud.model.Clazz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * ClassName: ClazzController
 * Package: com.example.crud.controller
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-01-15
 * Time: 14:38
 */

@RequestMapping("/clazz")
@RestController
public class ClazzController {

    @Autowired
    private ClazzMapper clazzMapper;

    //查询班级所有数据
    @RequestMapping("/clazzAll")
    public List<Clazz> clazzAll(){
        return clazzMapper.selectList(null);
    }
}
